#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define MAX_SIZE 50
typedef struct
{
	char data[MAX_SIZE];
	int top;
}seqstack;

void InitStack(seqstack*& s)
{
	s = (seqstack*)malloc(sizeof(seqstack));
	s->top = -1;
}

bool PushBack(seqstack*& s, char e)
{
	if (s->top == MAX_SIZE)
	{
		return false;
	}
	s->data[++s->top] = e;
	return true;
}

bool PopBack(seqstack*& s)
{
	if (s->top == -1)
	{
		return false;
	}
	s->top--;
	return true;
}

void DestroyStack(seqstack*& s)
{
	free(s->data);
	s->top = -1;
}

//bool symmety(char* str)
//{
//
//}

void PrintStack(seqstack* s)
{
	int n = s->top;
	while (n!=-1)
	{
		printf("%c ", s->data[n--]);
		printf("\n");
	}
}
int main()
{
	seqstack* s;
	InitStack(s);
	char str[8] = "1234321";
	//bool symmety(str);
	for (int i = 0; i < 7; i++)
	{
		PushBack(s, str[i]);
	}
	PrintStack(s);
	printf("111");

	return 0;
}